Whitespace cleanup. (synthesize_crossing_events): Add comments and prevent
authorRichard Hult <richard@imendio.com>
Tue, 8 Aug 2006 21:06:03 +0000 (21:06 +0000)
committerRichard Hult <rhult@src.gnome.org>
Tue, 8 Aug 2006 21:06:03 +0000 (21:06 +0000)
2006-08-08  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup.
(synthesize_crossing_events): Add comments and prevent a crash.

ChangeLog
ChangeLog.pre-2-10
gdk/quartz/gdkevents-quartz.c

index 5253c1da071c5859376105384c76c19433fa02a4..d02c45e581ebb67f83916cb9a62cbe6c9736b29d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-08  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup.        
+       (synthesize_crossing_events): Add comments and prevent a crash.
+
 2006-08-08  Michael Natterer  <mitch@imendio.com>
 
        * gdk/quartz/gdkwindow-quartz.c
index 5253c1da071c5859376105384c76c19433fa02a4..d02c45e581ebb67f83916cb9a62cbe6c9736b29d 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-08  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkevents-quartz.c: (poll_func): Whitespace cleanup.        
+       (synthesize_crossing_events): Add comments and prevent a crash.
+
 2006-08-08  Michael Natterer  <mitch@imendio.com>
 
        * gdk/quartz/gdkwindow-quartz.c
index 4fad00b932d3adb5b9b2eb9d721ca84b9c0a967d..c389a5099b11987b23e46fab08af7230161ccddb 100644 (file)
@@ -250,7 +250,6 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
     {
       if ([event type] == NSApplicationDefined)
        {
-
          pthread_mutex_lock (&pollfd_mutex);
 
          for (i = 0; i < n_pollfds; i++)
@@ -282,6 +281,7 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
   if (n_active == 0 && wakeup_pipe[1])
     {
       char c = 'A';
+
       write (wakeup_pipe[1], &c, 1);
     }
 
@@ -289,8 +289,8 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
     {
       ufds[0].revents = G_IO_IN;
 
-      /* FIXME: We can't assert here, what we need to to is to have a queue
-       * for events instead.
+      /* FIXME: We can't assert here, but we might need to have a
+       * queue for events instead.
        */
       /*g_assert (current_event == NULL);*/
 
@@ -955,8 +955,15 @@ synthesize_crossing_events (GdkWindow      *window,
     }
   else
     {
-      /* Dunno where we are coming from */
-      synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN);
+      /* This means we have not current_mouse_window. FIXME: Should
+       * we make sure to always set the root window instead of NULL?
+       */
+
+      /* FIXME: Figure out why this is being called with window being
+       * NULL. The check works around a crash for now.
+       */ 
+      if (window)
+       synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN);
     }
   
   _gdk_quartz_update_mouse_window (window);